.class Lcom/waiqin365/lightapp/visit/hb;
.super Landroid/os/Handler;


# instance fields
.field private a:Ljava/lang/ref/WeakReference;


# direct methods
.method public constructor <init>(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/waiqin365/lightapp/visit/hb;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 8

    iget-object v0, p0, Lcom/waiqin365/lightapp/visit/hb;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget v1, p1, Landroid/os/Message;->what:I

    packed-switch v1, :pswitch_data_0

    goto :goto_0

    :pswitch_0
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v1, Lcom/waiqin365/lightapp/visit/a/a/bi;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->dismissProgressDialog()V

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->c:Ljava/lang/String;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/a/a/bi;->b()Z

    move-result v3

    if-eqz v3, :cond_2

    const-string/jumbo v3, "1"

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->b:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_2

    new-instance v3, Lcom/waiqin365/lightapp/kehu/b/o;

    invoke-direct {v3}, Lcom/waiqin365/lightapp/kehu/b/o;-><init>()V

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->d:Ljava/lang/String;

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/o;->a:Ljava/lang/String;

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->e:Ljava/lang/String;

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/o;->b:Ljava/lang/String;

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->g:Ljava/lang/String;

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/o;->d:Ljava/lang/String;

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->f:Ljava/lang/String;

    iput-object v4, v3, Lcom/waiqin365/lightapp/kehu/b/o;->e:Ljava/lang/String;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->d(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v4

    invoke-virtual {v4, v3}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->a(Lcom/waiqin365/lightapp/kehu/b/o;)V

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->d(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;)Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;

    move-result-object v3

    invoke-virtual {v3}, Lcom/waiqin365/lightapp/view/ImagePreview_Vertical;->t()V

    new-instance v3, Landroid/content/Intent;

    invoke-direct {v3}, Landroid/content/Intent;-><init>()V

    const-string/jumbo v4, "index"

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->getIntent()Landroid/content/Intent;

    move-result-object v5

    const-string/jumbo v6, "index"

    const/4 v7, -0x1

    invoke-virtual {v5, v6, v7}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v5

    invoke-virtual {v3, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string/jumbo v4, "visitmanager"

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->e(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_1

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v4

    const-string/jumbo v5, "OfflineCmSelectActivity"

    invoke-virtual {v4, v5}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V

    invoke-static {}, Lcom/waiqin365/lightapp/view/a/b;->a()Ljava/util/Observable;

    move-result-object v4

    const-string/jumbo v5, "CMCustomerNearByActivity"

    invoke-virtual {v4, v5}, Ljava/util/Observable;->notifyObservers(Ljava/lang/Object;)V

    :cond_1
    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->f(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;)V

    invoke-static {v0, v3}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->a(Lcom/waiqin365/lightapp/visit/VisitPlanActivity;Landroid/content/Intent;)V

    :cond_2
    if-eqz v2, :cond_3

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v3

    if-nez v3, :cond_4

    :cond_3
    const v2, 0x7f08013b

    invoke-virtual {v0, v2}, Lcom/waiqin365/lightapp/visit/VisitPlanActivity;->getString(I)Ljava/lang/String;

    iget v1, v1, Lcom/waiqin365/lightapp/visit/a/a/bi;->a:I

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;I)V

    goto/16 :goto_0

    :cond_4
    const/4 v1, 0x0

    invoke-static {v0, v2, v1}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
    .end packed-switch
.end method
